#pragma once

#include "Sprites.h"

class GameLogic {
public:
	int playerLife;
	Sprite * playerLifeSprite;
	Rect* viewportRect;
	
	GameLogic(LPD3DXSPRITE spriteHandler) {
		initPlayerLifeSprite(spriteHandler);
	}

	void setViewportRect(Rect* viewportRect) {
		this->viewportRect = viewportRect;
	}

	void draw() {
		drawPlayerLife();
	}
	
	void initPlayerLifeSprite(LPD3DXSPRITE spriteHandler) {
		playerLifeSprite = new Sprite(spriteHandler, _ID_ICON_LIFE);
		playerLife = 3;
	}

	void drawPlayerLife() {
		int temp = 20;
		for (int i = 0; i < playerLife; i++ ) {
			playerLifeSprite->RenderNonTransform(temp, 20);
			temp += 25;
		}
	}
};